<?php
  class newModel extends Model{
	  //新建新闻的模型
	  //插入一条新闻
	public function insert(){
	    $title=$_POST['title'];
		$date=$_POST['date'];
    	$source=$_POST['source'];
	    $reporter=$_POST['reporter'];
	    $content=$_POST['content'];
        $editor=$_POST['editor'];
	    $sql="insert into news values(null,'0','{$title}','{$source}','{$date}','{$reporter}','{$content}','{$editor}'";
		return $this->db->query($sql);
	  }
  }
?>